<template>
  <el-container>
    <el-aside style="width: 200px">
      <Nav></Nav>
    </el-aside>
    <el-main style="text-align: center">
      <router-view v-if="isRouterAlive"></router-view>
    </el-main>
  </el-container>
</template>

<script lang="ts" setup>
import Nav from '../components/Nav.vue'
import { nextTick, provide, ref } from 'vue'

const isRouterAlive = ref(true)
const reload = () => {
  isRouterAlive.value = false
  nextTick(() => {
    isRouterAlive.value = true
  })
}
provide('reload', reload)
</script>
